package cn.oracle.eshop.comment.dao.impl;

import cn.oracle.eshop.comment.dao.CommentPictureDAO;
import cn.oracle.eshop.comment.domain.CommentPictureDO;
import cn.oracle.eshop.comment.mapper.CommentPictureMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

/**评论晒图管理模块的DAO组件
 * @author wyh
 * @ClassName CommentPictureDAOImpl
 * @date 2022/1/25 /22:37
 */
@Repository
@Slf4j
public class CommentPictureDAOImpl implements CommentPictureDAO {
    @Autowired
    private CommentPictureMapper commentPictureMapper;
    @Override
    public Boolean saveCommentPicture(CommentPictureDO commentPictureDO) {
        try {
            commentPictureMapper.saveCommentPicture(commentPictureDO);
        } catch (Exception e) {
            e.printStackTrace();
            log.error("error:{}",e);
            return  false;
        }
        return true;
    }
}
